package com.oocl.servlet;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;


public class ErrorServlet extends HttpServlet {
	private static final long serialVersionUID = 1L;

	protected void doGet(HttpServletRequest request, HttpServletResponse response) 
			throws ServletException, IOException {
		response.setContentType("text/html;charset=utf-8");
		String type = request.getParameter("errorType");
		if("1".equals(type)){
			response.getWriter().write("发送的数据格式错误");
		}else if("2".equals(type)){
			response.getWriter().write("用户名不能为空");
		}else if("3".equals(type)){
			response.getWriter().write("数据错误");
		}else if("4".equals(type)){
			response.getWriter().write("工资必须是数字");
		}else if("5".equals(type)){
			response.getWriter().write("时间格式错误");
		}else if("6".equals(type)){
			response.getWriter().write("头像内存太大");
		}
	}

}
